package com.lankystar.logistucs.spring.dao.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lankystar.logistucs.spring.dao.IOrderTypeDao;
import com.lankystar.logistucs.spring.entity.OrderType;

@Repository
public class OrderTypeDaoImpl extends BaseDaoImpl implements IOrderTypeDao {

	@Autowired
	private SessionFactory sf;
	
	public Session getSession(){
		System.out.println("session oneOrderDaoImpl");
		return sf.getCurrentSession();
	}
	@Override
	public OrderType selectOrderTypeById(int orderTypeId) {
		OrderType ot = (OrderType) getSession().get(OrderType.class, orderTypeId);
		return ot;
	}

	
}
